3.130 \(\int (a+a \sin (e+f x))^m \tan ^3(e+f x) \, dx\)

Optimal. Leaf size=163 \[ -\frac {a^2 \sin ^2(e+f x) (a \sin (e+f x)+a)^{m-1}}{f m (a-a \sin (e+f x))}+\frac {a (m+4) (a \sin (e+f x)+a)^{m-1} \, _2F_1\left (1,m-1;m;\frac {1}{2} (\sin (e+f x)+1)\right )}{4 f (1-m)}+\frac {\left (2 a m \sin (e+f x)+a \left (-m^2-3 m+2\right )\right ) (a \sin (e+f x)+a)^{m-1}}{2 f (1-m) m (1-\sin (e+f x))} \]

[Out]

1/4*a*(4+m)*hypergeom([1, -1+m],[m],1/2+1/2*sin(f*x+e))*(a+a*sin(f*x+e))^(-1+m)/f/(1-m)-a^2*sin(f*x+e)^2*(a+a*
sin(f*x+e))^(-1+m)/f/m/(a-a*sin(f*x+e))+1/2*(a+a*sin(f*x+e))^(-1+m)*(a*(-m^2-3*m+2)+2*a*m*sin(f*x+e))/f/(1-m)/
m/(1-sin(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2707, 100, 146, 68} \[ -\frac {a^2 \sin ^2(e+f x) (a \sin (e+f x)+a)^{m-1}}{f m (a-a \sin (e+f x))}+\frac {a (m+4) (a \sin (e+f x)+a)^{m-1} \, _2F_1\left (1,m-1;m;\frac {1}{2} (\sin (e+f x)+1)\right )}{4 f (1-m)}+\frac {\left (2 a m \sin (e+f x)+a \left (-m^2-3 m+2\right )\right ) (a \sin (e+f x)+a)^{m-1}}{2 f (1-m) m (1-\sin (e+f x))} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^m*Tan[e + f*x]^3,x]

[Out]

(a*(4 + m)*Hypergeometric2F1[1, -1 + m, m, (1 + Sin[e + f*x])/2]*(a + a*Sin[e + f*x])^(-1 + m))/(4*f*(1 - m))
- (a^2*Sin[e + f*x]^2*(a + a*Sin[e + f*x])^(-1 + m))/(f*m*(a - a*Sin[e + f*x])) + ((a + a*Sin[e + f*x])^(-1 +
m)*(a*(2 - 3*m - m^2) + 2*a*m*Sin[e + f*x]))/(2*f*(1 - m)*m*(1 - Sin[e + f*x]))

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 100

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(a +
 b*x)^(m - 1)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d*f*(m + n + p + 1)), x] + Dist[1/(d*f*(m + n + p + 1)), I
nt[(a + b*x)^(m - 2)*(c + d*x)^n*(e + f*x)^p*Simp[a^2*d*f*(m + n + p + 1) - b*(b*c*e*(m - 1) + a*(d*e*(n + 1)
+ c*f*(p + 1))) + b*(a*d*f*(2*m + n + p) - b*(d*e*(m + n) + c*f*(m + p)))*x, x], x], x] /; FreeQ[{a, b, c, d,
e, f, n, p}, x] && GtQ[m, 1] && NeQ[m + n + p + 1, 0] && IntegerQ[m]

Rule 146

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol] :
> Simp[((a^2*d*f*h*(n + 2) + b^2*d*e*g*(m + n + 3) + a*b*(c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b*f*h*(
b*c - a*d)*(m + 1)*x)*(a + b*x)^(m + 1)*(c + d*x)^(n + 1))/(b^2*d*(b*c - a*d)*(m + 1)*(m + n + 3)), x] - Dist[
(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m +
 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d*(b*c - a*d)*(m +
1)*(m + n + 3)), Int[(a + b*x)^(m + 1)*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && ((Ge
Q[m, -2] && LtQ[m, -1]) || SumSimplerQ[m, 1]) && NeQ[m, -1] && NeQ[m + n + 3, 0]

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^m \tan ^3(e+f x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^3 (a+x)^{-2+m}}{(a-x)^2} \, dx,x,a \sin (e+f x)\right )}{f}\\ &=-\frac {a^2 \sin ^2(e+f x) (a+a \sin (e+f x))^{-1+m}}{f m (a-a \sin (e+f x))}-\frac {\operatorname {Subst}\left (\int \frac {x (a+x)^{-2+m} \left (-2 a^2-a m x\right )}{(a-x)^2} \, dx,x,a \sin (e+f x)\right )}{f m}\\ &=-\frac {a^2 \sin ^2(e+f x) (a+a \sin (e+f x))^{-1+m}}{f m (a-a \sin (e+f x))}+\frac {(a+a \sin (e+f x))^{-1+m} \left (a \left (2-3 m-m^2\right )+2 a m \sin (e+f x)\right )}{2 f (1-m) m (1-\sin (e+f x))}-\frac {\left (a^2 (4+m)\right ) \operatorname {Subst}\left (\int \frac {(a+x)^{-2+m}}{a-x} \, dx,x,a \sin (e+f x)\right )}{2 f}\\ &=\frac {a (4+m) \, _2F_1\left (1,-1+m;m;\frac {1}{2} (1+\sin (e+f x))\right ) (a+a \sin (e+f x))^{-1+m}}{4 f (1-m)}-\frac {a^2 \sin ^2(e+f x) (a+a \sin (e+f x))^{-1+m}}{f m (a-a \sin (e+f x))}+\frac {(a+a \sin (e+f x))^{-1+m} \left (a \left (2-3 m-m^2\right )+2 a m \sin (e+f x)\right )}{2 f (1-m) m (1-\sin (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.26, size = 105, normalized size = 0.64 \[ \frac {a (a (\sin (e+f x)+1))^{m-1} \left (-m (m+4) (\sin (e+f x)-1) \, _2F_1\left (1,m-1;m;\frac {1}{2} (\sin (e+f x)+1)\right )+4 (m-1) \sin ^2(e+f x)+4 m \sin (e+f x)-2 \left (m^2+3 m-2\right )\right )}{4 f (m-1) m (\sin (e+f x)-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^m*Tan[e + f*x]^3,x]

[Out]

(a*(a*(1 + Sin[e + f*x]))^(-1 + m)*(-2*(-2 + 3*m + m^2) - m*(4 + m)*Hypergeometric2F1[1, -1 + m, m, (1 + Sin[e
 + f*x])/2]*(-1 + Sin[e + f*x]) + 4*m*Sin[e + f*x] + 4*(-1 + m)*Sin[e + f*x]^2))/(4*f*(-1 + m)*m*(-1 + Sin[e +
 f*x]))

________________________________________________________________________________________

fricas [F]  time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{3}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^3,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e) + a)^m*tan(f*x + e)^3, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^3,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e) + a)^m*tan(f*x + e)^3, x)

________________________________________________________________________________________

maple [F]  time = 0.26, size = 0, normalized size = 0.00 \[ \int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (\tan ^{3}\left (f x +e \right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^m*tan(f*x+e)^3,x)

[Out]

int((a+a*sin(f*x+e))^m*tan(f*x+e)^3,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \tan \left (f x + e\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*tan(f*x+e)^3,x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)^m*tan(f*x + e)^3, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (e+f\,x\right )}^3\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^3*(a + a*sin(e + f*x))^m,x)

[Out]

int(tan(e + f*x)^3*(a + a*sin(e + f*x))^m, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \tan ^{3}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**m*tan(f*x+e)**3,x)

[Out]

Integral((a*(sin(e + f*x) + 1))**m*tan(e + f*x)**3, x)

________________________________________________________________________________________